class CreateTimetableStatistics < ActiveRecord::Migration[5.0]
  def change
    create_table :timetable_statistics do |t|
      t.integer :timetable_id
      t.string :company, comment: '公司'
      t.string :store, comment: '门店'
      t.string :coach, comment: '教练'
      t.string :course, comment: '课程'
      t.datetime :class_start_time, comment: '日期'
      t.decimal :price, comment: '课程价格'
      t.integer :place, default: 0, comment: '剩余名额'
      t.integer :appointed, default: 0, comment: '预约人数'
      t.integer :signed, default: 0, comment: '签到人数'
      t.timestamps
    end
  end
end
